package org.bsc.vfs.gae;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.newatlanta.commons.vfs.provider.gae.GaeVFS;

public class Bootstrapper implements ServletContextListener {

	/**
	 * 
	 */
	@Override
	public void contextInitialized(ServletContextEvent sce) {
		final String rootPath = sce.getServletContext().getRealPath( "/" );

        GaeVFS.setRootPath( rootPath );

	}

	/**
	 * 
	 */
	@Override
	public void contextDestroyed(ServletContextEvent sce) {

		GaeVFS.clearFilesCache();	

	}

}
